/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.zjdt.epserver.db.dao;

import java.util.List;
import java.util.Map;

/**
 *
 * @author dusin
 */
public interface CargoDao {
    public int findCount(String sql ,Object[] args);
    List<Map<String,Object>> findAll(int start,int size); 
    public List<Map<String,Object>> findAll(String sql ,Object[] args);
    //创建记录,提交基本数据记录号recordNo,车牌号plateNo,驻厂员号siterID,工厂编码factoryCode,
    //时间arrivalTime,status,初始状态0
    public boolean doCreate(String recordNo,String plateNo,int siterID,String factoryCode,
            String arrivalTime,String rid);
    public boolean doCreate(String  recordNo,String plateNo,int siterID,String factoryCode,
            String arrivalTime,String grossWeight,String tareWeight,String netWeight,String minusImpurity,
            String companyCode,String productCode);
    public boolean doUpdateData(int ID,String  recordNo,String plateNo,int siterID,String factoryCode,
            String arrivalTime,String grossWeight,String tareWeight,String netWeight,String minusImpurity,
            String companyCode,String productCode);
    
    //修改4张照片的文件名
    public boolean doUpdatePhotoNameByRecordNo(String recordNo,String type,String filename);
    //填写榜单数据,毛重,皮重，扣杂，扣水，
    public boolean doUpdatePaperDataByRecordNo(String recordNo,double grossWeight,double tareWeight,double minusImpurity,
            double minusWater,double netWeight,int unit,String productCode,String companyCode);
    public boolean doUpdateAllPhotoByRecordNo(String recordNo,String frontFilename,String sideFilename,
            String licenseFilename,String paperFilename);
    public boolean doDeleteById(int id);
    //将status的对应为置1
    public boolean doUpdateBitById(int id,int bits);
    public boolean doUpdateBitByRecNo(String recNo,int bits);
    
    public List<Map<String, Object>> findPathByRID(String rid);
    
    //查找当前正在运行中的车辆
    public List<Map<String,Object>> findAllRunningTrucks(String factoryCode);
}
